package com.jr.controller;


import com.jr.entity.Resume;
import com.jr.entity.User;
import com.jr.service.ResumeService;
import org.bouncycastle.math.raw.Mod;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpSession;


/**
 * 简历表
 *
 * @author Snoopy
 * @since 1.0.0 2022-12-31
 */
@Controller
@SuppressWarnings("all")
public class ResumeController {

    //自动导入简历service接口
    @Autowired
    private ResumeService resumeService;

    @RequestMapping("insertresume")
    public ModelAndView selectJobAll(Resume resume, HttpSession session){
        User user = (User)session.getAttribute("user");
        resume.setRUid(user.getUid());
        ModelAndView modelAndView=new ModelAndView();
        int i = resumeService.insertResume(resume);
        modelAndView.setViewName("index.jsp");
        return modelAndView;

    }
}